package June.object;

public class Main {
    public static void main(String[] args) {
        Hero HanXi=new Hero("韩信",'男',100,100,100);
        Hero DianWei=new Hero("典韦",'男',80,170,100);

        System.out.println(HanXi);
        System.out.println(DianWei);

        while (true){
            HanXi.PK(DianWei);
            if (DianWei.getHP()==0){
                System.out.println(DianWei.getName()+"阵亡");
                break;
            }
            DianWei.PK(HanXi);
            if (HanXi.getHP()==0){
                System.out.println(HanXi.getName()+"阵亡");
                break;
            }
        }

    }
}
